package bb.lanxing.activity.base;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

import bb.lanxing.activity.interfaces.IBaseCommon;
import bb.lanxing.util.IMEUtil;


public class BaseCommonHelper implements IBaseCommon {
    private final Context context;

    public BaseCommonHelper(Context context) {
        this.context = context;
    }

    @Override
    public void goTargetActivity(Class<?> cls) {
        goTargetActivity(cls, null);
    }

    @Override
    public void goTargetActivity(Class<?> cls, Bundle bundle) {
        Intent intent = new Intent(context, cls);
        if (null != bundle) {
            intent.putExtras(bundle);
        }
        IMEUtil.hideInputMethod(context);
        context.startActivity(intent);
    }
}
